// Combinations.cpp : Defines the entry point for the console application.
//

#include <stdio.h>
#include <tchar.h>
#include <iostream>
#include <vector>
#include <string>
#include <map>

#include "D:\cpp\LIB\combination\combination.h"

using namespace std;
using namespace stdcomb;

#include "Deck.h"
#include "TexasHoldemStats.h"

class Test
{
public:
    void func() {};
};

int g_Count = 0;

map<CPokerCombination::Combination, int> counter;

void display(CardsIterator begin, CardsIterator end)
{

    Test* test = 0;
    test->func();

    g_Count++;
    if ( (g_Count % 1000) == 0 )
        cout << g_Count <<  endl;

    CPokerCombination pc(begin);
    pc.check();

    counter[pc.mCombination]++;

    //  for (vii it=begin;it!=end;++it)
    //      cout << it->getIndex();
    //  cout << endl;
}

int _tmain(int argc, _TCHAR* argv[])
{
    CDeck Deck;

    CPokerCombination pc;
    int i = 8;
    pc += CCard(i++);
    pc += CCard(i++);
    pc += CCard(i++);
    pc += CCard(i++);
    pc += CCard(i++);
    pc.check();

    vector<CCard> cb;
    cb.push_back ( CCard(1) );
    cb.push_back ( CCard(2) );
    cb.push_back ( CCard(3) );
    cb.push_back ( CCard(4) );
    cb.push_back ( CCard(5) );

        recursive_combination(Deck.mCards.begin(), Deck.mCards.end(),0,
            cb.begin(),cb.end(),0, 52-5, display);

    cout<<"Complete!"<<endl;

    cout << g_Count << ".  ";


    system("pause");
    return 0;
}

